import App from './App'
import Vue from 'vue'
import Mock from './mock/mock.js' //测试用数据
import './uni.promisify.adaptor'

// 弹框提示
const msg = (title, duration=1500, mask=false, icon='none')=>{
	if(Boolean(title) === false) return
	uni.showToast({ title, duration, mask, icon});
}
// 模拟接口
const data = type => {
	return new Promise(resolve => {
		setTimeout(() => {
			resolve(Mock[type])
		},500)
	})
}

Vue.prototype.$api = { msg, data };
Vue.config.productionTip = false
App.mpType = 'app'

const app = new Vue({
  ...App
})
app.$mount()